
<form action="acmAuthenticate.groovy" method="post" id="frmLogin" data-ajax="false">
	<fieldset>
		<div data-role="fieldcontain">
			<label for="userId"><em>* </em> User Id</label>
			<input type="text" name="userId" value="" id="userId"/>
		</div>
		<div data-role="fieldcontain">
			<label for="password"><em>* </em> Password</label>
			<input type="password" name="password" value="" id="password"/>
		</div>
		<div align="center">
			<button type="submit" name="action" value="login" data-inline="true" data-theme="b">Login</button>
		</div>
	</fieldset>
</form>

<script>
\$(document).ready(function(){
   	\$("#frmLogin").validate({
   		rules: {
   			userId   : "required",
   			password : "required"
   		},
   		messages: {
   			userId   : "Enter your user id",
   			password : "Enter your password"
   		},
   	    submitHandler: function(form) {
       		form.submit();
   	    }
   	});
   	\$('#userId').focus();
});
</script>